package top.zywork.service;

import java.math.BigDecimal;
import java.util.List;

/**
 * GoodsCommissionService服务接口<br/>
 *
 * 创建于2019-07-22<br/>
 *
 * @author http://zywork.top 王振宇
 * @version 1.0
 */
public interface GoodsCommissionService extends BaseService {

    /**
     * 根据用户编号，商品编号或商品sku编号，分销等级去获取该用户的商品最大的分销比例
     * @param userId
     * @param goodsId
     * @param goodsSkuId
     * @param distributionLevel
     * @return
     */
    BigDecimal getCommissionPercent(Long userId, Long goodsId, Long goodsSkuId, Integer distributionLevel);

    /**
     * 删除指定的佣金比例并重新批量保存
     * @param goodsId
     * @param goodsSkuId
     * @param dataTransferObjList
     */
    int removeAndSaveBatch(Long goodsId, Long goodsSkuId, List<Object> dataTransferObjList);
}
